<template>
    <div>
      <el-row>
        <el-col :span="2" v-for="(createItem, index) in createList" :key="index" :offset="index%8==0?0:1">
          <el-card :body-style="{ padding: '0px' }" shadow="hover" style="margin-bottom: 10px; -webkit-transition-duration:0.3s; -webkit-transition-timing-function:linear; -webkit-transition-delay:0.01s;">
            <my-created-article :createItem="createItem"></my-created-article>
          </el-card>
        </el-col>
      </el-row>
    </div>
</template>
<script>
  import {mapState,mapActions,mapGetters} from 'vuex'
  import MyCreatedArticle from '../../components/MyCreatedArticle.vue'
  export default {
    name: 'Mydoc',
    data() {
      return {
        currentDate: new Date(),
        userid:this.userInfo.userid
      };
    },
    mounted () {
      console.log('000')
      this.recordCreateList(this.userInfo.userid)
      this.inituser()
      console.log(this.userInfo.userid)
    },

    computed:{
      
      ...mapState(['createList','userInfo']),
      ...mapGetters([//管理所有的事件
      'begin',
      'end',
      'user'
    ]),
    },
    methods:{
      ...mapActions(['recordCreateList']),
      ...mapActions(['getUserInfo']),
      async inituser(){
        this.recordCreateList(this.userInfo.userid)
        console.log(this.userInfo.userid)
        console.log(this.createList)
      }
    },
    components: {MyCreatedArticle},
  }
</script>

<style>
.time {
  font-size: 13px;
  color: #999;
}

.bottom {
  margin-top: 5px;
  line-height: 12px;
}

.button {
  padding: 0;
  float: right;
}

.image {
  width: 100%;
  display: block;
  margin-top: 4px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both
}
</style>
